072 sorting of boxes based on weight part 1 of 3
嗨,大家好?
Hi guys?
欢迎来到 NFI 在线视频教程,在本课中我们将学习“如何根据重量进行箱子分类?”
Welcome to NFI online video tutorials and in this lesson we are learn about 'How to do box sorting based on weight?
这是因为我们学生的要求之一......
This is because of one of the request from our student...
他想学习如何根据重量对盒子进行分类。
he wants to learn how to how to sort the boxes based on weight..
如何测量盒子或任何其他原材料的重量。
how to measure the weight of the boxes or any other raw material.
这是一个工厂 I/O 环境,我们已经在其中创建了这个场景,您可以...
So this is a Factory I/O environment in which we have this scene already made you can...
您可以从“文件”-“新建”中获取它,并且从场景中您会发现基于环境中已进行的权重的排序。
you can take it from File - New and from the scenes you will find a sorting based on weight already made there in the environment.
但我做了一些小的改变,所以......我已经改变了传感器,这是一个回归反射传感器之前......
But I have made some little changes so ...I have changed the sensor this was a retro-reflective sensor it before..
就像那个。
like that one .
由于某种原因,我对此进行了更改,并且我从这里删除了一些传感器,因为我认为我们不需要它,因为我们将使用数据库、数组,并且我们正在使用数组存储数据库。
I have changed with this one for some reason and I have removed few sensors from here because I don't think we need it because we are you going to use the database, the arrays and we are storing the database using arrays.
所以我认为不需要这些传感器。
So I don't think those sensors are required.
因此,如果您要复制此环境,您可以从此处移除传感器并根据需要更换传感器,否则您也可以通过其他多种方式进行操作。
So if you are going to duplicate this environment you can remove the sensor from here and change the sensor if you want otherwise you can also do it in other multiple ways.
好吧 ..
Alright ..
所以在这个环境下让我们看看我们有什么..
so in this environment let's see what we have..
我们这里这是一个发射器......
we have here this is a emitter ...
这很好,这会发出盒子..
this is good this is going to emit the boxes..
这是主传送带,那么这里有第一个传感器。
this is the main conveyor then you have this first sensor here..
这是一个漫射传感器,然后你就有了一个体重秤,所以我要做的就是运行这个程序,然后我会向你解释这些东西是如何工作的。
this is a diffuse sensor and then you have a weighing scale alright so what I'll do is I'll just run this program and then I'll explain you how these things are working.
所以我选择“播放”并开始,所以当我启动这个程序时,您将同时看到这个重量,这个重量是秤变量,它将向您显示盒子的重量。
So I go with 'Play' and start so when I start this program you will see parallelly this weight right and this weight is the weighing scale variables which will show you the weight of the box.
所以现在电压就出来了..
So this is right now coming in voltage..
好吧,这个盒子的电压是 4.0,这是一个更大的盒子,我们得到的是 7.5。所以我们将把它视为一个电压,所以根据我们从传感器(秤)获得的电压。
Alright like this is 4.0 for this box and this is a bigger box for which we are getting 7.5 ..so we will consider this as a voltage so based on the voltage we are getting from our sensor which is a weighing scale..
我们正在改变滚轮的位置,所以到目前为止您会注意到更大的盒子......这是我们拥有的最大的盒子,它直接朝这个方向移动。
we are changing the roller position so you will notice so far that the bigger boxes...This is the biggest box we have it's going straight in this direction.
当你有一个不同的盒子来更换滚轮时......
When you have a different box for that roller changes and ..
这是一个向右的中号盒子 这又是一个中号盒子,所以滚轮会自动更换 滚轮从秤上接收到信号,好吗?
this is a medium box that that goes to the right this is again a medium box so automatically rollers will change the rollers are getting the signal from this weighing scale okay?
这是你的中号盒子。这是一个较小的盒子,所以它会放在这边,所以我们有三种类型的盒子,即小型、中型和大型。
This is your medium..this is a smaller box so this is going to this side so we have three types of boxes this is a small, medium and large.
好吧,这里是三个退出转换,没什么特别的,你有一些去除剂。
Okay so and here these are the three exit converts nothing so special in that and you have some removers..
这是一个用于计算盒子数量的传感器......
This is a sensor which is going to count the boxes ...
好吧,这是一个非常简单的环境,只有四个主要传送带,一个秤,这是将推动箱子的推动器 - 你可以将其称为滚轮推动器,或者具体来说,让我看看我们这里有什么......等等第二,好吧,他们这里有三个标签,向前发送,向右发送,向左发送。
okay so it's a very simple environment only you four main conveyors, one weighing scale and this is the pusher which will push the boxes - you can call it as a roller pusher or to be specific let me see what do we have here..wait a second okay they have three tags here sent forwards and send right and send left.
好的,这里我们有一个面板,其中有一些按钮,因此我们将使用这些按钮并显示重量,您可以看到这是当前盒子的重量,就像向左移动 4 公斤,这是一个计数 5、10 和 5,由出口处的这些传感器计数。
Alright so and here we have a panel where we have some buttons so we will be using these buttons and will be displaying the weight you can see that this is a weight of current box this is like 4 kg going to the left and this is a count 5, 10 and 5 which are counted by these sensors on the exit.
好吧,我们的任务非常简单,我们必须根据盒子的重量对盒子进行排序......
Alright so our task is very simple we have to sort the Box based on their weight...
现在的问题是 - 我们应该将较大的盒子或中型盒子或小盒子发送到哪里?
now the question is - Where should we send the larger box or the medium box or the small box?
这取决于您,但在我们的练习中,我们将遵循“配方 1”中的三个配方,我们将在前向传送带中移动较大的盒子,我们将其称为前向传送带,并将中型盒子移动到右侧的传送带和左侧传送带的小盒子这与这里发生的情况类似,好吗?
This is up to you but in our exercise we'll follow the three recipes in the 'Recipe 1' what we'll do we'll move the larger box in the forward conveyor let's call it forward conveyor and will move the medium box to the right conveyor and small box to the left conveyor this is similar to what is happening here okay?
该程序后面是“配方 1”..然后我们将制作“配方 2”,其中我们的大盒子将转到右侧,中盒子将转到左侧,小盒子将转到前输送机..你可以看到然后我们有第三个具有不同配置的配方。
This program is followed by 'Recipe 1'..then we will make 'Recipe 2' in which our large box will go to right, medium box will go to left and small box to go to the forward conveyor ..you can see that then we have a third recipe with a different configuration.
要改变食谱...
To change the recipe ...
我要做的是教你如何制作一个数据寄存器,通过它你可以改变配方......
what I'm going to do is I'm going to teach you how to make a data register by which you can change the recipe...
如果我从0到1..
if I make from 0 to 1 ..
将其设为十进制,我们会注意到现在配方已更改。
make it decimal and we will notice now the recipe is changed.
这是较小的盒子,较小的盒子会向前移动,好吧。
This is the smaller box and the smaller box is going to the forward okay..
当然还有其他较大和中等的盒子,这是向左的中号盒子,这是向右的大盒子,因为我选择了第二个食谱。
and naturally the other larger and the medium boxes this is the medium going to the left and this is a large going to the right, because I chose the second recipe.
我在那里选了一个...
I selected one there...
按“0”- 选择“菜谱1”,按“1”- 选择“菜谱2”,按“2”选择“菜谱3”。
by '0' - 'Recipe 1' is selected by '1' - 'Recipe 2' is selected and by '2' 'Recipe 3' is selected.
这就是我们在plc中所做的好吗?
This is what we do in the plc alright?
因此,如果您想跟随我学习本课程,这就是我们必须要做的主要目标......
So this is the main objective of what we have to do if you want to follow me along this lessons ...
您可以暂停视频,也可以快速创建此环境并设置您的西门子 TIA。
you can Pause the video or you can quickly make this environment and set up your Siemens TIA..
这样你就可以根据我的解释并行地建立逻辑。
so that you can parallely make the logic along with my explanations..
我们将使用梯形逻辑,并且由于数组和配方函数,我们还将使用一些 SQL 命令,所以我将开始...
we are going to use ladder logic and we are also going to use some SQL commands because of the array and the recipe function alright so I will start...
我将从下一个视频开始编程。
I will start programming from the next video.
好的 ?
Ok ?
谢谢 ?
Thank you ?